<?php
require('../vendor/autoload.php');

use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeyFactory;

$master_xpub = file_get_contents('./wallet/master-xpub');
$masterKey = HierarchicalKeyFactory::fromExtended($master_xpub);

for($i=0;$i<3;$i++){
  $key = $masterKey->deriveChild($i);
  echo 'public key ' . $i . ' => ' . $key->getPublicKey()->getHex() . PHP_EOL;
}

